<template>
	<div id="app">
		<router-view></router-view>
		<Navbar></Navbar>
	</div>
</template>

<script>
// import Search from './components/search';
// var Search = require('./components/search.vue');
export default{
	components:{
		// Login(resolve){require.ensure([],() => {resolve(require('../components/login')),'component'})},
		Navbar:s => s(require('../common/navbar'))
	},
	beforeRouteEnter(to,from,next){
		let a_touch = () => {
			let a = document.querySelectorAll('a');
			a.forEach((item,index)=>{
				item.addEventListener('touchstart',function(){
					this.classList.add('a_mouseDown')
				},false)
			});
			a.forEach((item,index)=>{
				item.addEventListener('touchend',function(){
					this.classList.remove('a_mouseDown')
				},false)
			});
			window.removeEventListener('touchstart',a_touch)
		}

		window.addEventListener('touchstart',a_touch)

		next()
	},
	data() {
		return{
			msg:'hellow zhaodi aaaaaaa'
		}
	},
	methods:{
		
	},
	mounted(){
		console.log('ssssssssssssssssss');
	}
}
</script>

